package com.oto.web.model;

import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;

/**
 * @author xueqiang.mi
 * @since 2010-12-18
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Message")
public class Message {

	@XmlElement(name = "account")
	private List<XmlAccount> accounts;
	@XmlElement(name = "pack")
	protected List<XmlPack> packs;

	public List<XmlAccount> getAccounts() {
		if (accounts == null) {
			accounts = new ArrayList<XmlAccount>();
		}
		return accounts;
	}

	public List<XmlPack> getPacks() {
		if (packs == null) {
			packs = new ArrayList<XmlPack>();
		}
		return packs;
	}

	public void setAccounts(List<XmlAccount> accounts) {
		this.accounts = accounts;
	}

	public void setPacks(List<XmlPack> packs) {
		this.packs = packs;
	}

	@Override
	public String toString() {
		return "LivingFlow [packs=" + packs + ", accounts=" + accounts + "]";
	}
}
